//
//  XUOuthModel.h
//  新浪微博
//
//  Created by xuwenxin on 15-4-12.
//  Copyright (c) 2015年 xuwenxin. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface XUOuthModel : NSObject
/*
 "access_token" = "2.0067CEQB01ILEM1cfcfde8dbUWek6C";
 "expires_in" = 157679999;
 "remind_in" = 157679999;
 uid = 1153516845;
 */
@property (nonatomic, copy) NSString *access_token;
@property (nonatomic, copy) NSString *expires_in;
@property (nonatomic, copy) NSString *remind_in;
@property (nonatomic, copy) NSString *uid;

// 真正的过期时间, 从授权成功的那一刻开始加上expires_in(多少秒之后过期)
@property (nonatomic, strong) NSDate *expires_time;

@property (nonatomic, copy) NSString *profile_image_url;

- (instancetype)initWithDict:(NSDictionary *)dict;
+ (instancetype)outhWithDict:(NSDictionary *)dict;

// 存储当前授权模型
- (BOOL)save;
// 读取当前授权模型
+ (instancetype)accountFromSandbox;
@end
